package com.zkn.orm.jboss.jpa.service.impl;

import com.zkn.orm.jboss.jpa.dao.DepartmentDao;
import com.zkn.orm.jboss.jpa.dao.impl.DepartmentDaoImpl;
import com.zkn.orm.jboss.jpa.service.DepartmentService;
import com.zkn.orm.spring.data.jpa.model.Department;

public class DepartmentServiceImpl implements DepartmentService {

	private DepartmentDao departmentDao = new DepartmentDaoImpl();
	
	@Override
	public Department createDepartment(String name, String code) {
		Department department = new Department();
		department.setDepartmentName(name);
		department.setDepartmentCode(code);
		
		return departmentDao.save(department);
	}

}
